09. Fixing Data Types Pt 1
Fixing Data Types
In the next three sections, you'll make the following changes to make the datatypes consistent and practical to work with.
Fix
cyl
datatype
- 2008: extract int from string.
- 2018: convert float to int.
Fix
air_pollution_score
datatype
- 2008: convert string to float.
- 2018: convert int to float.
Fix
city_mpg
,
hwy_mpg
,
cmb_mpg
datatypes
- 2008 and 2018: convert string to float.
Fix
greenhouse_gas_score
datatype
- 2008: convert from float to int.
In this first part, you'll tackle the first one, fixing the
cyl
datatype.
Workspace
This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity , so you may be able to download them there.
Workspace Information:
- Default file path:
- Workspace type: jupyter
- Opened files (when workspace is loaded): n/a